<?php

namespace IDock\Insurance\TPIC\Request;

use Exception;
use IDock\Insurance\TPIC\Request\AllTPICRequest;
use IDock\Insurance\TPIC\Response\CancelOrderResponse;
use IDock\Insurance\TPIC\Response\OfferOrderPriceResponse;
use IDock\Insurance\TPIC\Response\SaveVehicleResponse;
use IDock\Insurance\TPIC\Response\VehicleModelResponse;
use IDock\Insurance\TPIC\TPICEnums;
use IDock\Visitor\Premium\PremiumCoverageVisitor;
use IDock\Visitor\Premium\PremiumInquiryVisitor;
use IDock\Visitor\Premium\PremiumUnderwritingVisitor;
use IDock\Visitor\ProposalRecallVisitor;
use IDock\Visitor\VehicleModelVisitor;

/**
 * 核保撤单
 */
class OrderCancelRequest extends AllTPICRequest
{
    protected $response = CancelOrderResponse::class;

    protected $urlTip = '核保撤单';

    public $route = 'cancelPolicy';

    /**
     * @var ProposalRecallVisitor $visitor
     */
    protected $visitor;

    public function generate(): array
    {
        $arr = [
            'order' => [
                'orderNo' => $this->visitor->argc['orderNo'] ?? '',
            ],
            'common' => [
                'cancelType' => '0',//0:撤销支付登记及投保 1:撤销支付登记 2:撤销投保
            ],
        ];
        return $arr;
    }
}
